#ifndef __INTERPRETER_H__
#define __INTERPRETER_H__
#include "syntax_tree.h"
#include "symbol_table.h"
typedef enum {
	ITPT_RET_MIN,
	ITPT_INT,
	ITPT_VAR,
	ITPT_RET_MAX
} itpt_ret_type;
typedef struct {
	itpt_ret_type type;
	union {
		//not symbol* ,note that: who alloc who release
		//now not symbol,because this reference the linked list or tree
		symbol *var;
		int integer;
	};
} itpt_ret;
itpt_ret* interpreter(syntax_t t);
itpt_ret* itpt_ret_creat(itpt_ret_type type);
void itpt_ret_free(itpt_ret* e);
itpt_ret** get_itpt_ret_list(syntax_t * stlist,int no);
void free_itpt_ret_list(itpt_ret** list,int no);
int isTrue(itpt_ret *ret);
#endif
